<template>
  <div>
    <v-chart :option="option_column" style="height: 400px" @click="handleClick"></v-chart>
  </div>
</template>

<script>
export default {
  data() {

    // setInterval(() => {this.option_column.series[0].data[0] ++},1000);

    return {
      option_column: {
        color: ["#f00","#0f0"],
        title: { text: "Column Chart" },
        tooltip: {},
        xAxis: {
          type: "value"
          // data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"],
        },
        yAxis: {
          data: ["成都", "绵阳", "自贡", "攀枝花", "泸州", "德阳","广元"]
        },
        // 定义数据
        series: [
          {
            name: "确诊人数",
            type: "bar",
            data: [5, 20, 36, 10, 10, 20,20],
          },
          {
            name: "无症状人数",
            type: "bar",
            data: [20, 100, 75, 80,150, 5,20],
          },
        ],
      },
    };
  },
  methods: {
    handleClick(v) {
      console.log(v);
    }
  }
};
</script>
<style>
</style>